package rmi.tests.server;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.RemoteServer;
import java.rmi.server.UnicastRemoteObject;

import rmi.tests.Inter;
import rmi.tests.InterImpl;

public class Server {

	/**
	 * @param args
	 * @throws RemoteException
	 */
	public static void main(String[] args) throws RemoteException {
		Registry reg = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);

		Inter stub = (Inter) UnicastRemoteObject.exportObject(new InterImpl(),
				0);
		reg.rebind("Inter", stub);

		System.out.println(reg);
		RemoteServer.setLog(System.out);
	}

}
